//
//  ShouCangViewViewController.m
//  ZhiBoYuan
//
//  Created by coder_di on 2018/4/17.
//  Copyright © 2018年 apple. All rights reserved.
//

#import "ShouCangViewViewController.h"
#import "KeChengSCViewController.h"
#import "TiSCViewController.h"


@interface ShouCangViewViewController ()
@property(nonatomic,strong)CKSlideMenu *slideMenu;
@end

@implementation ShouCangViewViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.title = @"我的收藏";
    

    [self.view addSubview:self.slideMenu];

}



//- (void)initWithViews{
//    NSArray *titles = @[@"课程收藏",@"试题收藏"];
//    NSMutableArray *arr = [NSMutableArray array];
//    KeChengSCViewController *keche = [KeChengSCViewController new];
//    TiSCViewController *tiVC = [TiSCViewController new];
//    [arr addObject:keche];
//    [arr addObject:tiVC];
//
//    CKSlideMenu *slideMenu = [[CKSlideMenu alloc]initWithFrame:CGRectMake(0, NAVIGATION_BAR_HEIGHT,ScreenWidth, 45)  titles:titles controllers:arr];
//
//
//    slideMenu.frame = CGRectMake(0, 64, screenWidth, 45);
//    slideMenu.bodyFrame = CGRectMake(0,45 + NAVIGATION_BAR_HEIGHT,ScreenWidth,Screenheight- NAVIGATION_BAR_HEIGHT- TAB_BAR_HEIGHT);
//    slideMenu.bodySuperView = self.view;
//    slideMenu.indicatorOffsety = 2;
//    slideMenu.indicatorWidth = ScreenWidth/3-2;
//
//    slideMenu.font = [UIFont systemFontOfSize:17];
//    slideMenu.titleStyle     = SlideMenuTitleStyleGradient;
//    slideMenu.indicatorStyle = SlideMenuIndicatorStyleNormal;
//
//    slideMenu.isFixed = YES;
//    slideMenu.showLine = YES;
//
//    slideMenu.selectedColor = ZhuTiColor;
//    slideMenu.indicatorColor = ZhuTiColor;
//
//    slideMenu.unselectedColor = [UIColor grayColor];
//    [self.view addSubview:slideMenu];
//}

-(CKSlideMenu *)slideMenu{
    if (!_slideMenu) {
        NSArray *titles = @[@"课程收藏",@"试题收藏"];
        NSMutableArray *arr = [NSMutableArray array];
        KeChengSCViewController *keche = [KeChengSCViewController new];
        TiSCViewController *tiVC = [TiSCViewController new];
        [arr addObject:keche];
        [arr addObject:tiVC];

        CKSlideMenu *slideMenu = [[CKSlideMenu alloc]initWithFrame:CGRectMake(0, NAVIGATION_BAR_HEIGHT,ScreenWidth, 45)  titles:titles controllers:arr];

        slideMenu.bodyFrame = CGRectMake(0,45 + NAVIGATION_BAR_HEIGHT,ScreenWidth,Screenheight- NAVIGATION_BAR_HEIGHT- TAB_BAR_HEIGHT);
        
        slideMenu.bodySuperView = self.view;
        slideMenu.indicatorOffsety = 2;
        slideMenu.indicatorWidth = ScreenWidth/3-2;
        
        slideMenu.font = [UIFont systemFontOfSize:17];
        slideMenu.titleStyle     = SlideMenuTitleStyleGradient;
        slideMenu.indicatorStyle = SlideMenuIndicatorStyleNormal;
        
        slideMenu.isFixed = YES;
        slideMenu.showLine = YES;
        
        slideMenu.selectedColor = ZhuTiColor;
        slideMenu.indicatorColor = ZhuTiColor;
        
        slideMenu.unselectedColor = [UIColor grayColor];
        _slideMenu = slideMenu;
    }
    return _slideMenu;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}




@end
